<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSystemConfigTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('system_config', function (Blueprint $table) {
            $table->bigInteger('id', true);
            $table->string('config_type', 45)->default('')->comment('配置分类');
            $table->string('k', 45)->comment('key');
            $table->string('content', 16000)->nullable()->comment('value');
            $table->string('desciption', 255)->nullable()->comment('描述');
            $table->dateTime('create_time')->nullable()->useCurrent();
            $table->bigInteger('creator_id')->nullable()->default(0);
            $table->dateTime('update_time')->nullable()->useCurrent();
            $table->bigInteger('updater_id')->nullable()->default(0);
            $table->integer('deleted')->nullable()->default(0);
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('system_config');
    }
};
